//
//  MJ_DocmentsModel.m
//  UEAssistant
//
//  Created by mac on 2018/1/23.
//  Copyright © 2018年 youyixinxi. All rights reserved.
//

#import "MJ_DocmentsModel.h"

@implementation MJ_DocmentsModel

- (instancetype)init
{
    self = [super init];
    if (self) {
        _word_openhidden = @"0";
        _word_opencomments = @"0";
        
        _excel_openhidden = @"0";
        _excel_opensheetname = @"0";
        _excel_opencomments = @"0";
        _excel_openinside = @"0";
        
        _powerpoint_openhidden = @"0";
        _powerpoint_opencomments = @"0";
        _powerpoint_opennotes = @"0";
        _powerpoint_opensegtitle = @"0";
        _powerpoint_openinside = @"0";
        
        _deal_no_translation = @"0";
        _cad_parse_off_layer = @"0";
        _cad_parse_freeze_layer = @"0";
        _cad_parse_lock_layer = @"0";
        
        _visio_opencomments = @"0";
        _visio_page_name = @"0";
        
        _xmind_canvas_name = @"0";
        _xmind_opennotes = @"0";
        _xmind_opencomments = @"0";
        _xmind_openlables = @"0";
    }
    return self;
}

- (NSDictionary *)dictionaryWithProperty {
    
    return @{@"word_openhidden":_word_openhidden,
             @"word_opencomments":_word_opencomments,
             
             @"excel_openhidden":_excel_openhidden,
             @"excel_opensheetname":_excel_opensheetname,
             @"excel_opencomments":_excel_opencomments,
             @"excel_openinside":_excel_openinside,
             
             @"powerpoint_openhidden":_powerpoint_openhidden,
             @"powerpoint_opencomments":_powerpoint_opencomments,
             @"powerpoint_opennotes":_powerpoint_opennotes,
             @"powerpoint_opensegtitle":_powerpoint_opensegtitle,
             @"powerpoint_openinside":_powerpoint_openinside,
             
             @"deal_no_translation":_deal_no_translation,
             @"cad_parse_off_layer":_cad_parse_off_layer,
             @"cad_parse_freeze_layer":_cad_parse_freeze_layer,
             @"cad_parse_lock_layer":_cad_parse_lock_layer,
             
             @"visio_opencomments":_visio_opencomments,
             @"visio_page_name":_visio_page_name,
             
             @"xmind_canvas_name":_xmind_canvas_name,
             @"xmind_opennotes":_xmind_opennotes,
             @"xmind_opencomments":_xmind_opencomments,
             @"xmind_openlables":_xmind_openlables};
}

- (BOOL)docmentWithType:(MJDocmentsType)type result:(NSArray *)array {
    switch (type) {
        case MJDocmentsTypeWord://@"导入隐藏内容",@"导入批注"
            _word_openhidden = array[0];
            _word_opencomments = array[1];
            return YES;
            
        case MJDocmentsTypeExcel://@"导入隐藏内容",@"导入表名",@"导入批注"
            _excel_openhidden = array[0];
            _excel_opensheetname = array[1];
            _excel_opencomments = array[2];
            return YES;
            
        case MJDocmentsTypePPT:// 导入隐藏内容",@"导入备注",@"导入节标题
            _powerpoint_openhidden = array[0];
            _powerpoint_opencomments = array[1];
            _powerpoint_opensegtitle = array[2];
            return YES;
            
        case MJDocmentsTypeXmind://@"导入画布名",@"导入批注",@"导入备注",@"导入标签"
            _xmind_canvas_name = array[0];
            _xmind_opencomments = array[1];
            _xmind_opennotes = array[2];
            _xmind_openlables = array[3];
            return YES;
            
        case MJDocmentsTypeCAD://@"导入非译句子",@"导入关闭文字",@"导入冻结文字",@"导入锁定文字"
            _deal_no_translation = array[0];
            _cad_parse_off_layer = array[1];
            _cad_parse_freeze_layer = array[2];
            _cad_parse_lock_layer = array[3];
            return YES;
            
        case MJDocmentsTypVisio://@"导入批注",@"导入页名"
            _visio_opencomments = array[0];
            _visio_page_name = array[1];
            return YES;
            
        case MJDocmentsTypeSdlxliff://@"导入隐藏内容",@"导入表名",@"导入批注"
            return YES;
        case MJDocmentsTypePDF:
            
            return NO;
            
        default:
            return NO;
    }
}

@end
